<template>
	<view>
	
		<tn-list-view title="消息列表" unlined="bottom">
			<tn-swipe-action>
			  <tn-swipe-action-item v-for="(item,index) in 2" :key="index" :name="index" :options="options2">
				<view class="swipe-action__item tn-flex tn-flex-direction-row tn-flex-col-top tn-flex-row-left">
				  <tn-list-cell :unlined="true">
					<view class="message">
					  <view class="message__left">
						<tn-avatar src="https://resource.tuniaokj.com/images/avatar/xiaomai1.jpg"></tn-avatar>
					  </view>
					  <view class="message__middle">
						<view class="message__name">小图鸟</view>
						<view class="message__content tn-text-ellipsis">欢迎使用图鸟UI，图鸟UI专做UI界面100年</view>
					  </view>
					  <view class="message__right">
						<view class="message__time">13:14</view>
						<view class="message__tips">
						  <tn-tag backgroundColor="tn-bg-red" fontColor="tn-color-white" shape="circle" width="auto" size="sm">99</tn-tag>
						</view>
					  </view>
					</view>
				  </tn-list-cell>
				</view>
			  </tn-swipe-action-item>
			</tn-swipe-action>
		</tn-list-view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				options2: [{
				    text: '置顶',
				    style: {
				      backgroundColor: '#FFA726'
				    }
				  },
				  {
				    text: '删除',
				    style: {
				      backgroundColor: '#E83A30'
				    }
				  }
				]
			}
		},
		methods: {
			
		}
	}
</script>

<style lang="scss" scoped>
  
  .components-list {
    background-color: $tn-bg-gray-color;
    min-height: 100vh;
  }
  
  .custom-title {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 10rpx 20rpx;
  }
  
  .list__options {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  
  .list {
    &__left {
      display: flex;
      align-items: center;
      justify-content: flex-start;
      
      &__icon, &__image {
        margin-right: 18rpx;
      }
    }
    
    &__right {
      display: flex;
      align-items: center;
      justify-content: flex-end;
    }
  }
  
  .list-icon-text, .list-image-text {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  
  .list-image-text {
    .list {
      &__left {
        &__image {
          width: 20rpx;
          height: 20rpx;
        }
      }
    }
  }
  
  .message {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    
    &__left {
      width: 10%;
    }
    &__middle {
      width: 80%;
      padding-left: 20rpx;
      padding-right: 40rpx;
    }
    &__right {
      width: 10%;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
    }
    
    &__name {
      font-size: 32rpx;
      margin-bottom: 8rpx;
    }
    &__content {
      font-size: 26rpx;
      color: #838383;
    }
    &__tips {
      &__icon {
        font-size: 36rpx;
        color: #AAAAAA;
      }
    }
  }
</style>
